home *** CD-ROM | disk | FTP | other *** search
- tgdsupp.obj function summary:
- =============================
-
- This list contains UNIX-like summaries for the routines that
- are currently contained in tgdsuppx.obj.
-
- tgdsuppx.obj is for use with the tgdlp4xx.obj ModeX graphics
- driver. It is not a stand alone module. The system requirements
- for tgdsuppx.obj are the same as for tgdlp4xx.obj (see
- tgdlp4.txt).
-
- tgdsuppc.obj is compiled for the COMPACT memory model.
- This means that all calls to procedures must be declared as
- NEAR while pointers to data are all FAR.
- tgdsuppl.obj is compiled for the LARGE memory model. In this
- model all calls to procedures as well as all pointers to data
- are to be declared as FAR.
-
- tgdsuppx.obj expects all parameters to be passed using C
- calling conventions. The C calling mechanism is described in
- tgdlp4.txt.
-
-
- bitmap far *newbitmap(uword xsize,uword ysize);
- allocate memory for a bitmap and a bitmap structure and
- initialize previously allocated bitmap structure
-
- FUNCTION:
- This routine allocates conventional memory for a bitmap and
- the matching bitmap structure. It also initializes the bitmap
- structure.
- Note: the memory allocated for the bitmap itself is not
- cleared. This procedure may be used before calling
- tgdlp4xx.obj's getbitmap().
-
- INPUTS:
- xsize,ysize: size of the bitmap in pixels for which memory
- should be allocated. The minimal size is (1,1) -
- reserving memory for a bitmap with only one pixel.
-
- RESULT:
- bitmap *yourbitmap: pointer to the bitmap structure or 0 if
- there was not enough free conventional
- memory.
-
- BUGS:
- none known
-
- SEE ALSO:
- freebitmap()
- tgdlp4.txt: getbitmap()
-
-
- void freebitmap(bitmap far *yourbitmap);
- free bitmap and bitmap structure memory
-
- FUNCTION:
- Use freebitmap() to free all memory previously allocated with
- newbitmap().
-
- INPUTS:
- *yourbitmap: pointer to a bitmap structure returned by
- newbitmap().
-
- RESULT:
- none
-
- BUGS:
- none known
-
- SEE ALSO:
- newbitmap()
-
-
- spriteinc far *newsprite(word collxpos,word collypos,uword collxsize,uword collysize,spritemap far *spritedef);
- allocate memory for a sprite incarnation structure and
- initialize the structure
-
- FUNCTION:
- tgdlp4xx.obj cannot work directly with the spritemap structure
- supplied by lp4suppx.obj's readsc() function. To handle a
- sprite tgdlp4xx.obj needs a sprite incarnation structure which
- can be generated by this procedure. All you need to create
- the sprite incarnation structure is to load a sprite animation
- using readsc() and then passing a pointer to the spritemap
- structure along with your user-defined sprite collision
- rectangle parameters to this routine. newsprite() then creates
- the sprite incarnation structure and returns a pointer to it
- or 0 if there was not enough memory left for creation of the
- structure.
- A user-defined sprite collision rectangle in principle works
- like this: If you call tgdlp4xx.obj's ucollspr() routine the
- user sprite collision rectangle of the sprite passed to this
- routine will be tested against all other user sprite collision
- rectangles of all other sprites for overlapping. If two
- rectangles overlap ucollspr() will recognize this as a
- sprite-sprite collision.
- To define a user sprite collision rectangle pass the position
- of the upper left edge of it - which is expected to be
- relative from the upper left edge of the sprite - in the
- collxpos, collypos variables. Pass the (x,y) size of the
- rectangle in the (collxsize,collysize) variables. A (x,y) size
- of (0,0) means the rectangle has a size of one pixel.
-
- INPUTS:
- collxpos, collypos: x,y position of the top left edge of the
- user-defined sprite collision rectangle
- relative to the top left edge of the
- sprite.
- collxsize, collysize: x,y size of the user sprite collision
- rectangle. A size of (0,0) means the
- sprite collision rectangle has the size
- of one pixel.
- *spritedef: pointer to a spritemap structure which can be
- obtained by calling lp4suppx.obj's readsc()
- function.
-
- RESULT:
- spriteinc *yoursprite: pointer to the sprite incarnation
- structure or 0 if there was not enough
- free memory to create the structure.
-
- BUGS:
- none known
-
- SEE ALSO:
- freesprite()
- lp4supp.txt: readsc()
- tgdlp4.txt: ucollspr(), addspr()
-
-
- void freesprite(spriteinc far *yoursprite);
- free sprite incarnation structure
-
- FUNCTION:
- To free the memory which was previously allocated by
- newsprite() for a sprite incarnation structure you can use
- this routine. Before freeing the sprite incarnation structure
- make sure that the sprite is removed from the sprite display
- list. To delete a sprite from the display list use the
- following function call sequence: offspr(), refreshspr(),
- removespr(). All these functions are contained in tgdlp4xx.obj.
- I recommend to call freesprite() before calling lp4suppx.obj's
- freesc() for freeing the rest of the sprite structures if a
- sprite is no longer needed.
-
- INPUTS:
- *yoursprite: pointer to a sprite incarnation structure
- returned by newsprite()
-
- RESULT:
- none
-
- BUGS:
- none known
-
- SEE ALSO:
- newsprite()
- tgdlp4.txt: offspr(), refreshspr(), removespr()
- lp4supp.txt: freesc()
-
-
- void framewait(uword frames);
- wait for a number of frames
-
- FUNCTION:
- This procedure waits the number of frames requested. Usually
- a VGA card will produce 70 frames a second in the physical
- resolution modes offered by tgdlp4xx.obj.
- WARNING: This function may not be called when the vrclk
- library is in use at the same time.
-
- INPUTS:
- frames: number of frames to wait.
-
- RESULT:
- none
-
- BUGS:
- none known
-
- SEE ALSO:
- tgdlp4.txt: waittof()
-
-